using System;
using System.Diagnostics;
using System.ServiceModel;

namespace Unity.Extensions
{
    public class TestService : ITestService
    {
        readonly ITestRepository repository;

        public TestService() {}

        public TestService(ITestRepository repository)
        {
            this.repository = repository;
        }

        public void TestOperation()
        {
            if (repository == null)
                throw new FaultException<string>("No repository injected.");

            Trace.WriteLine("Executing TestOperation()");
        }
    }
}